package com.jasonzqshen.ifm.collections.treeCollection;

import org.w3c.dom.*;

import com.jasonzqshen.ifm.collections.treeCollection.factories.*;
import com.jasonzqshen.ifm.utils.Identifier;

public class TreeLeaf extends TreeObject implements NonRoot {
    private NonLeaf parent;

    public TreeLeaf(Identifier id) {
        super(id);
        
    }

    /**
     * <p>
     * Get parent
     * </p>
     * <p>
     * The method cannot override.
     * </p>
     */
    @Override
    public final NonLeaf getParent() {
        return this.parent;
    }

    /**
     * <p>
     * Set parent
     * </p>
     * <p>
     * The method cannot override.
     * </p>
     */
    @Override
    public final void setParent(NonLeaf parent) {
        this.parent = parent;
    }

    @Override
    public Element toXElem() throws TreeCollectionException {
        return super.toXElem();
    }

    /**
     * Parse XML element to tree leaf. do nothing.
     * 
     * @param xelem
     * @param factory
     * @param leaf
     */
    public static void xmlParser(Element xelem, TreeFactory factory,
            TreeLeaf leaf) {
        // do nothing
    }

}
